<%@LANGUAGE="JAVASCRIPT" CODEPAGE="65001"%>
<!-- #include file = "core.asp" -->
<%
	var _system = $('system');
	var _database = $('database');
	_database.path = "database/#database.mdb";
	
	var _id = parseInt(_system.read('id')) || 0;
	
	if (_id != 0) {
		var _info = _database.query('select [Title], [Datetime], [Content] from [Article] where [Id] = ' + _id);
	
		var _data = {
			title : _info[0].title,
			datetime : _system.format('date', _info[0].datetime, 'YYYY-MM-DD'),
			content : _info[0].content
		}
		
		var _template = $('template');
		_system.write(_template.render(_data));
	}
%>